



float gaussianBlurR(sampler2D tex, in vec2 texCoords, in vec2 invResolution, float sigma) {
	float color = 0;
	
	float blurSize = 3 * sigma;
	float weightSum = 0.0;
	
	for (float i = -blurSize; i <= blurSize; ++i) {
		for (float j = -blurSize; j <= blurSize; ++j) {
			float weight = f_glsl_gaussianWeight(i, j, sigma);
			weightSum += weight;
			vec2 offset = vec2(i, j) * invResolution;
			color += texture(tex, texCoords + offset).r * weight;
		}
	}
	return color / weightSum;
}
float gaussianBlurG(sampler2D tex, in vec2 texCoords, in vec2 invResolution, float sigma) {
	float color = 0;
	
	float blurSize = 3 * sigma;
	float weightSum = 0.0;
	
	for (float i = -blurSize; i <= blurSize; ++i) {
		for (float j = -blurSize; j <= blurSize; ++j) {
			float weight = f_glsl_gaussianWeight(i, j, sigma);
			weightSum += weight;
			vec2 offset = vec2(i, j) * invResolution;
			color += texture(tex, texCoords + offset).g * weight;
		}
	}
	return color / weightSum;
}
float gaussianBlurB(sampler2D tex, in vec2 texCoords, in vec2 invResolution, float sigma) {
	float color = 0;
	
	float blurSize = 3 * sigma;
	float weightSum = 0.0;
	
	for (float i = -blurSize; i <= blurSize; ++i) {
		for (float j = -blurSize; j <= blurSize; ++j) {
			float weight = f_glsl_gaussianWeight(i, j, sigma);
			weightSum += weight;
			vec2 offset = vec2(i, j) * invResolution;
			color += texture(tex, texCoords + offset).b * weight;
		}
	}
	return color / weightSum;
}



